package com.xn.myyxcampus.utils;

import android.app.Activity;

import com.xn.myyxcampus.R;






/**
 * The Animation between two Activities.
 * @author Fay
 */

public class AnimUtils {
	
	/**
	 * 从左到右平移
	 * 和toLeft()配套使用
	 * @param activity
	 */
	
	public static void toRight(Activity activity){
		activity.overridePendingTransition(R.anim.push_right_in, R.anim.push_right_out);
	}
	/**
	 * 从右到左平移
	 * 和toRight()配套使用
	 * @param activity
	 */
	public static void toLeft(Activity activity){
		activity.overridePendingTransition(R.anim.push_left_in, R.anim.push_left_out);
	}
	
	/**
	 *放缩(进入Activity)
	 *和scaleOut配套使用
	 * @param activity
	 */
	public static void scaleIn(Activity activity){
		activity.overridePendingTransition(R.anim.main_enter, R.anim.main_exit);
	}
	
	/**
	 * 放缩(退出Activity)
	 * 和scaleIn配套使用
	 * @param activity
	 */
	public static void scaleOut(Activity activity){
		activity.overridePendingTransition(R.anim.back_enter, R.anim.back_exit);
	}
	
	

}
